import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import qs from 'qs'
import axios from 'axios'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import wangEditor from 'wangeditor';

Vue.prototype.wangEditor = wangEditor;
Vue.prototype.axios = axios
Vue.prototype.qs = qs
Vue.config.productionTip = false
Vue.use(ElementUI)

// 请求拦截器
axios.interceptors.request.use(config=>{
  // console.log(config,"config")
  // NProgress.start()
  config.headers.Authorization = localStorage.getItem("localJwt");
  return config;
})
// 响应拦截器
//Nprogress
axios.interceptors.response.use(config=>{
  // NProgress.done()
  return config;
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


